export default {
  totalMoney (state) {
    return state.cart.reduce((money, shop) => {
      if (shop.check) {
        money += shop.price * shop.count
      }
      return money
    }, 0)
  },
  isAllcheck (state) {
    return state.cart.length === 0 ? '' : state.cart.every(shop => shop.check)
  }
}
